<?php

class AdsController extends Base {
  use CURD;

  public $tableName = 'ads';
  protected $deleted_at = true;
  protected $isTree = false;
  protected $likeField = 'title'; 
  protected $parentKey = 'pid';
  protected $relations = [
    'market_id' => ['table'=>'markets','as'=>'market','pri'=>'id','cols'=>['id','title'],'where'=>['deleted_at'=>null],'type'=>'one'],
'cat_id' => ['table'=>'cates','as'=>'cat','pri'=>'id','cols'=>['id','title'],'where'=>['deleted_at'=>null],'type'=>'one'],
'platform_id' => ['table'=>'platforms','as'=>'platform','pri'=>'id','cols'=>['id','title'],'where'=>['deleted_at'=>null],'type'=>'one'],
  ];
}
